package com.xauto.pioneer.appuser.model;

import org.json.JSONObject;

/**
 * 图片对象
 * @author Lemon Mon 27 Feb 16:10
 */
public class Image extends BaseModel<Image> {

    /** 原图*/
    public String source="";
    /** 缩略图*/
    public String thumb="";
    /** 附加訂單*/
    public String image="";
    public Image() {
    }

    public Image(String thumb) {
        this.thumb = thumb;
    }

    public Image(String source, String thumb, String image) {
        this.source = source;
        this.thumb = thumb;
        this.image = image;
    }

    @Override
    public Image parse(JSONObject jsonObject) {
        if(jsonObject != null) {
            source = jsonObject.optString("source");
            thumb = jsonObject.optString("thumb");
            image = jsonObject.optString("image");
            return this;
        }
        return null;
    }
}
